import net from 'net'
import { Pipe } from './pipe'

const client = net.createConnection({
	host: 'localhost',
	port: 6666,
})

const pipe = new Pipe()
const buffer = pipe.pack('Hello, server!')
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
client.write(buffer)
